home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5495 < prev    next >
Encoding:
Text File  |  1996-08-05  |  695 b   |  21 lines

  1. Newsgroups: comp.lang.c
  2. Path: novice.uwaterloo.ca!w3yu
  3. From: w3yu@novice.uwaterloo.ca (Wei Yu)
  4. Subject: drand48() problems
  5. Sender: news@novice.uwaterloo.ca (Mr. News)
  6. Message-ID: <DMoE0p.BKs@novice.uwaterloo.ca>
  7. Date: Mon, 12 Feb 1996 18:29:13 GMT
  8. Nntp-Posting-Host: novice.uwaterloo.ca
  9. Organization: University of Waterloo
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Hi, I am trying to generate random numbers with the drand48() routine
  13. available in UNIX C library. But apperantly, drand48() always returns 0.
  14. lrand48(), which generates long integer, does work, but I get the same
  15. sequence of numbers regardless of what seed I provide using srand48(). 
  16.  
  17. Am I missing something here?
  18.  
  19. Thanks.
  20.  
  21.